/*
 * @Author: gitee_com_zb
 * @Date: 2024-12-11 15:37:31
 * @LastEditors: gitee_com_zb
 * @LastEditTime: 2024-12-11 15:37:43
 * @FilePath: /algorithm/每日一题11.反转字符串(easy).cpp
 * @Description: 题目链接 https://leetcode.cn/problems/reverse-string
 */
class Solution {
public:
    void reverseString(vector<char>& s) {
        int n = s.size();
        int left = 0, right = n - 1;
        while(left < right)
            swap(s[left++], s[right--]);
    }
};